import 'package:flutter/material.dart';
import 'package:flutter_smart_heating/common/app.dart';
import 'package:flutter_smart_heating/ui/ui.dart';

class HelpCenterItemView extends StatelessWidget {
  const HelpCenterItemView({
    super.key,
    required this.item,
  });

  final dynamic item;

  @override
  Widget build(BuildContext context) {
    return UiListCell(
      onTap: () {
        App.push(item['url'] ?? '');
      },
      backgroundColor: UiTheme(context).panelBackground,
      padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 14),
      leading: const UiIcon(
        UiIcons.question_circle_fill,
        color: UiTheme.primary,
      ),
      dividerIndent: 25,
      leadingSpace: 5,
      title: Text(
        item['title'],
      ),
      showArrow: true,
      showDivider: true,
    );
  }
}
